<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>跳转提示</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
        * { font-family: "Microsoft Yahei" }
        .success { color: green; }
        .error { color: red; }
        .text-center { text-align: center; }
    </style>
</head>
<body>

<div class="container">
    <div class="row">
        <div class="col-lg-12 <?php echo $code==1?'success':'error' ?>">
            <h3 class="text-center"><?php echo(strip_tags($msg));?></h3>
        </div>
        <div class="col-lg-12">
            <p class="jump text-center">
                页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间： <b id="wait"><?php echo($wait);?></b>
            </p>
        </div>
    </div>
</div>

<script type="text/javascript">
    (function(){
        var wait = document.getElementById('wait'),
            href = document.getElementById('href').href;
        var interval = setInterval(function(){
            var time = --wait.innerHTML;
            if(time <= 0) {
                location.href = href;
                clearInterval(interval);
            };
        }, 1000);
    })();
</script>
</body>
</html>